<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><link rel="stylesheet" type="text/css" href="style.css" /><script type="text/javascript" src="highlight.js"></script></head><body><pre><span class="hs-pragma">{-# LANGUAGE CPP #-}</span><span>
</span><span id="line-2"></span><span class="hs-pragma">{-# LANGUAGE DeriveFunctor #-}</span><span>
</span><span id="line-3"></span><span class="hs-comment">-- Note: This module was copied from cabal-install.</span><span>
</span><span id="line-4"></span><span>
</span><span id="line-5"></span><span class="hs-comment">-- | A progress monad, which we use to report failure and logging from</span><span>
</span><span id="line-6"></span><span class="hs-comment">-- otherwise pure code.</span><span>
</span><span id="line-7"></span><span class="hs-keyword">module</span><span> </span><span class="hs-identifier">Distribution.Utils.Progress</span><span>
</span><span id="line-8"></span><span>    </span><span class="hs-special">(</span><span> </span><span class="annot"><a href="Distribution.Utils.Progress.html#Progress"><span class="hs-identifier">Progress</span></a></span><span>
</span><span id="line-9"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Utils.Progress.html#stepProgress"><span class="hs-identifier">stepProgress</span></a></span><span>
</span><span id="line-10"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Utils.Progress.html#failProgress"><span class="hs-identifier">failProgress</span></a></span><span>
</span><span id="line-11"></span><span>    </span><span class="hs-special">,</span><span> </span><span class="annot"><a href="Distribution.Utils.Progress.html#foldProgress"><span class="hs-identifier">foldProgress</span></a></span><span>
</span><span id="line-12"></span><span>    </span><span class="hs-special">)</span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-13"></span><span>
</span><span id="line-14"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="../../base/src/Prelude.html#"><span class="hs-identifier">Prelude</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span>
</span><span id="line-15"></span><span class="hs-keyword">import</span><span> </span><span class="annot"><a href="Distribution.Compat.Prelude.html"><span class="hs-identifier">Distribution.Compat.Prelude</span></a></span><span>
</span><span id="line-16"></span><span>
</span><span id="line-17"></span><span class="hs-keyword">import</span><span> </span><span class="hs-keyword">qualified</span><span> </span><span class="annot"><a href="../../base/src/Data.Monoid.html#"><span class="hs-identifier">Data.Monoid</span></a></span><span> </span><span class="hs-keyword">as</span><span> </span><span class="annot"><span class="hs-identifier">Mon</span></span><span>
</span><span id="line-18"></span><span>
</span><span id="line-19"></span><span>
</span><span id="line-20"></span><span class="hs-comment">-- | A type to represent the unfolding of an expensive long running</span><span>
</span><span id="line-21"></span><span class="hs-comment">-- calculation that may fail (or maybe not expensive, but complicated!)</span><span>
</span><span id="line-22"></span><span class="hs-comment">-- We may get intermediate steps before the final</span><span>
</span><span id="line-23"></span><span class="hs-comment">-- result which may be used to indicate progress and\/or logging messages.</span><span>
</span><span id="line-24"></span><span class="hs-comment">--</span><span>
</span><span id="line-25"></span><span class="hs-comment">-- TODO: Apply Codensity to avoid left-associativity problem.</span><span>
</span><span id="line-26"></span><span class="hs-comment">-- See http://comonad.com/reader/2011/free-monads-for-less/ and</span><span>
</span><span id="line-27"></span><span class="hs-comment">-- http://blog.ezyang.com/2012/01/problem-set-the-codensity-transformation/</span><span>
</span><span id="line-28"></span><span class="hs-comment">--</span><span>
</span><span id="line-29"></span><span class="hs-keyword">data</span><span> </span><span id="Progress"><span class="annot"><a href="Distribution.Utils.Progress.html#Progress"><span class="hs-identifier hs-var">Progress</span></a></span></span><span> </span><span id="local-6989586621679616599"><span class="annot"><a href="#local-6989586621679616599"><span class="hs-identifier hs-type">step</span></a></span></span><span> </span><span id="local-6989586621679616598"><span class="annot"><a href="#local-6989586621679616598"><span class="hs-identifier hs-type">fail</span></a></span></span><span> </span><span id="local-6989586621679616593"><span class="annot"><a href="#local-6989586621679616593"><span class="hs-identifier hs-type">done</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span id="Step"><span class="annot"><a href="Distribution.Utils.Progress.html#Step"><span class="hs-identifier hs-var">Step</span></a></span></span><span> </span><span class="annot"><a href="#local-6989586621679616599"><span class="hs-identifier hs-type">step</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Utils.Progress.html#Progress"><span class="hs-identifier hs-type">Progress</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679616599"><span class="hs-identifier hs-type">step</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679616598"><span class="hs-identifier hs-type">fail</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679616593"><span class="hs-identifier hs-type">done</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-30"></span><span>                             </span><span class="hs-glyph">|</span><span> </span><span id="Fail"><span class="annot"><a href="Distribution.Utils.Progress.html#Fail"><span class="hs-identifier hs-var">Fail</span></a></span></span><span> </span><span class="annot"><a href="#local-6989586621679616598"><span class="hs-identifier hs-type">fail</span></a></span><span>
</span><span id="line-31"></span><span>                             </span><span class="hs-glyph">|</span><span> </span><span id="Done"><span class="annot"><a href="Distribution.Utils.Progress.html#Done"><span class="hs-identifier hs-var">Done</span></a></span></span><span> </span><span class="annot"><a href="#local-6989586621679616593"><span class="hs-identifier hs-type">done</span></a></span><span>
</span><span id="line-32"></span><span>  </span><span class="hs-keyword">deriving</span><span> </span><span class="hs-special">(</span><span id="local-6989586621679616518"><span id="local-6989586621679616522"><span class="annot"><span class="annottext">(forall a b.
 (a -&gt; b) -&gt; Progress step fail a -&gt; Progress step fail b)
-&gt; (forall a b. a -&gt; Progress step fail b -&gt; Progress step fail a)
-&gt; Functor (Progress step fail)
forall a b. a -&gt; Progress step fail b -&gt; Progress step fail a
forall a b.
(a -&gt; b) -&gt; Progress step fail a -&gt; Progress step fail b
forall step fail a b.
a -&gt; Progress step fail b -&gt; Progress step fail a
forall step fail a b.
(a -&gt; b) -&gt; Progress step fail a -&gt; Progress step fail b
forall (f :: * -&gt; *).
(forall a b. (a -&gt; b) -&gt; f a -&gt; f b)
-&gt; (forall a b. a -&gt; f b -&gt; f a) -&gt; Functor f
&lt;$ :: forall a b. a -&gt; Progress step fail b -&gt; Progress step fail a
$c&lt;$ :: forall step fail a b.
a -&gt; Progress step fail b -&gt; Progress step fail a
fmap :: forall a b.
(a -&gt; b) -&gt; Progress step fail a -&gt; Progress step fail b
$cfmap :: forall step fail a b.
(a -&gt; b) -&gt; Progress step fail a -&gt; Progress step fail b
</span><a href="../../base/src/GHC.Base.html#Functor"><span class="hs-identifier hs-var hs-var hs-var hs-var hs-var hs-var">Functor</span></a></span></span></span><span class="hs-special">)</span><span>
</span><span id="line-33"></span><span>
</span><span id="line-34"></span><span class="hs-comment">-- | Emit a step and then continue.</span><span>
</span><span id="line-35"></span><span class="hs-comment">--</span><span>
</span><span id="line-36"></span><span id="local-6989586621679616596"><span id="local-6989586621679616597"><span class="annot"><a href="Distribution.Utils.Progress.html#stepProgress"><span class="hs-identifier hs-type">stepProgress</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679616597"><span class="hs-identifier hs-type">step</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Utils.Progress.html#Progress"><span class="hs-identifier hs-type">Progress</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679616597"><span class="hs-identifier hs-type">step</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679616596"><span class="hs-identifier hs-type">fail</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span></span></span><span>
</span><span id="line-37"></span><span id="stepProgress"><span class="annot"><span class="annottext">stepProgress :: forall step fail. step -&gt; Progress step fail ()
</span><a href="Distribution.Utils.Progress.html#stepProgress"><span class="hs-identifier hs-var hs-var">stepProgress</span></a></span></span><span> </span><span id="local-6989586621679616515"><span class="annot"><span class="annottext">step
</span><a href="#local-6989586621679616515"><span class="hs-identifier hs-var">step</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">step -&gt; Progress step fail () -&gt; Progress step fail ()
forall step fail done.
step -&gt; Progress step fail done -&gt; Progress step fail done
</span><a href="Distribution.Utils.Progress.html#Step"><span class="hs-identifier hs-var">Step</span></a></span><span> </span><span class="annot"><span class="annottext">step
</span><a href="#local-6989586621679616515"><span class="hs-identifier hs-var">step</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">() -&gt; Progress step fail ()
forall step fail done. done -&gt; Progress step fail done
</span><a href="Distribution.Utils.Progress.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span> </span><span class="hs-special">(</span><span class="hs-special">)</span><span class="hs-special">)</span><span>
</span><span id="line-38"></span><span>
</span><span id="line-39"></span><span class="hs-comment">-- | Fail the computation.</span><span>
</span><span id="line-40"></span><span id="local-6989586621679616590"><span id="local-6989586621679616591"><span id="local-6989586621679616592"><span class="annot"><a href="Distribution.Utils.Progress.html#failProgress"><span class="hs-identifier hs-type">failProgress</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="annot"><a href="#local-6989586621679616592"><span class="hs-identifier hs-type">fail</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Utils.Progress.html#Progress"><span class="hs-identifier hs-type">Progress</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679616591"><span class="hs-identifier hs-type">step</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679616592"><span class="hs-identifier hs-type">fail</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679616590"><span class="hs-identifier hs-type">done</span></a></span></span></span></span><span>
</span><span id="line-41"></span><span id="failProgress"><span class="annot"><span class="annottext">failProgress :: forall fail step done. fail -&gt; Progress step fail done
</span><a href="Distribution.Utils.Progress.html#failProgress"><span class="hs-identifier hs-var hs-var">failProgress</span></a></span></span><span> </span><span id="local-6989586621679616514"><span class="annot"><span class="annottext">fail
</span><a href="#local-6989586621679616514"><span class="hs-identifier hs-var">err</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">fail -&gt; Progress step fail done
forall step fail done. fail -&gt; Progress step fail done
</span><a href="Distribution.Utils.Progress.html#Fail"><span class="hs-identifier hs-var">Fail</span></a></span><span> </span><span class="annot"><span class="annottext">fail
</span><a href="#local-6989586621679616514"><span class="hs-identifier hs-var">err</span></a></span><span>
</span><span id="line-42"></span><span>
</span><span id="line-43"></span><span class="hs-comment">-- | Consume a 'Progress' calculation. Much like 'foldr' for lists but with two</span><span>
</span><span id="line-44"></span><span class="hs-comment">-- base cases, one for a final result and one for failure.</span><span>
</span><span id="line-45"></span><span class="hs-comment">--</span><span>
</span><span id="line-46"></span><span class="hs-comment">-- Eg to convert into a simple 'Either' result use:</span><span>
</span><span id="line-47"></span><span class="hs-comment">--</span><span>
</span><span id="line-48"></span><span class="hs-comment">-- &gt; foldProgress (flip const) Left Right</span><span>
</span><span id="line-49"></span><span class="hs-comment">--</span><span>
</span><span id="line-50"></span><span id="local-6989586621679616583"><span id="local-6989586621679616584"><span id="local-6989586621679616585"><span id="local-6989586621679616586"><span class="annot"><a href="Distribution.Utils.Progress.html#foldProgress"><span class="hs-identifier hs-type">foldProgress</span></a></span><span> </span><span class="hs-glyph">::</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679616586"><span class="hs-identifier hs-type">step</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679616585"><span class="hs-identifier hs-type">a</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679616585"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679616584"><span class="hs-identifier hs-type">fail</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679616585"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="hs-special">(</span><span class="annot"><a href="#local-6989586621679616583"><span class="hs-identifier hs-type">done</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679616585"><span class="hs-identifier hs-type">a</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-51"></span><span>             </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="Distribution.Utils.Progress.html#Progress"><span class="hs-identifier hs-type">Progress</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679616586"><span class="hs-identifier hs-type">step</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679616584"><span class="hs-identifier hs-type">fail</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679616583"><span class="hs-identifier hs-type">done</span></a></span><span> </span><span class="hs-glyph">-&gt;</span><span> </span><span class="annot"><a href="#local-6989586621679616585"><span class="hs-identifier hs-type">a</span></a></span></span></span></span></span><span>
</span><span id="line-52"></span><span id="foldProgress"><span class="annot"><span class="annottext">foldProgress :: forall step a fail done.
(step -&gt; a -&gt; a)
-&gt; (fail -&gt; a) -&gt; (done -&gt; a) -&gt; Progress step fail done -&gt; a
</span><a href="Distribution.Utils.Progress.html#foldProgress"><span class="hs-identifier hs-var hs-var">foldProgress</span></a></span></span><span> </span><span id="local-6989586621679616513"><span class="annot"><span class="annottext">step -&gt; a -&gt; a
</span><a href="#local-6989586621679616513"><span class="hs-identifier hs-var">step</span></a></span></span><span> </span><span id="local-6989586621679616512"><span class="annot"><span class="annottext">fail -&gt; a
</span><a href="#local-6989586621679616512"><span class="hs-identifier hs-var">err</span></a></span></span><span> </span><span id="local-6989586621679616511"><span class="annot"><span class="annottext">done -&gt; a
</span><a href="#local-6989586621679616511"><span class="hs-identifier hs-var">done</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">Progress step fail done -&gt; a
</span><a href="#local-6989586621679616510"><span class="hs-identifier hs-var">fold</span></a></span><span>
</span><span id="line-53"></span><span>  </span><span class="hs-keyword">where</span><span> </span><span id="local-6989586621679616510"><span class="annot"><span class="annottext">fold :: Progress step fail done -&gt; a
</span><a href="#local-6989586621679616510"><span class="hs-identifier hs-var hs-var">fold</span></a></span></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Utils.Progress.html#Step"><span class="hs-identifier hs-type">Step</span></a></span><span> </span><span id="local-6989586621679616509"><span class="annot"><span class="annottext">step
</span><a href="#local-6989586621679616509"><span class="hs-identifier hs-var">s</span></a></span></span><span> </span><span id="local-6989586621679616508"><span class="annot"><span class="annottext">Progress step fail done
</span><a href="#local-6989586621679616508"><span class="hs-identifier hs-var">p</span></a></span></span><span class="hs-special">)</span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">step -&gt; a -&gt; a
</span><a href="#local-6989586621679616513"><span class="hs-identifier hs-var">step</span></a></span><span> </span><span class="annot"><span class="annottext">step
</span><a href="#local-6989586621679616509"><span class="hs-identifier hs-var">s</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Progress step fail done -&gt; a
</span><a href="#local-6989586621679616510"><span class="hs-identifier hs-var">fold</span></a></span><span> </span><span class="annot"><span class="annottext">Progress step fail done
</span><a href="#local-6989586621679616508"><span class="hs-identifier hs-var">p</span></a></span><span class="hs-special">)</span><span>
</span><span id="line-54"></span><span>        </span><span class="annot"><a href="#local-6989586621679616510"><span class="hs-identifier hs-var">fold</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Utils.Progress.html#Fail"><span class="hs-identifier hs-type">Fail</span></a></span><span> </span><span id="local-6989586621679616507"><span class="annot"><span class="annottext">fail
</span><a href="#local-6989586621679616507"><span class="hs-identifier hs-var">f</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">fail -&gt; a
</span><a href="#local-6989586621679616512"><span class="hs-identifier hs-var">err</span></a></span><span> </span><span class="annot"><span class="annottext">fail
</span><a href="#local-6989586621679616507"><span class="hs-identifier hs-var">f</span></a></span><span>
</span><span id="line-55"></span><span>        </span><span class="annot"><a href="#local-6989586621679616510"><span class="hs-identifier hs-var">fold</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Utils.Progress.html#Done"><span class="hs-identifier hs-type">Done</span></a></span><span> </span><span id="local-6989586621679616506"><span class="annot"><span class="annottext">done
</span><a href="#local-6989586621679616506"><span class="hs-identifier hs-var">r</span></a></span></span><span class="hs-special">)</span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">done -&gt; a
</span><a href="#local-6989586621679616511"><span class="hs-identifier hs-var">done</span></a></span><span> </span><span class="annot"><span class="annottext">done
</span><a href="#local-6989586621679616506"><span class="hs-identifier hs-var">r</span></a></span><span>
</span><span id="line-56"></span><span>
</span><span id="line-57"></span><span id="local-6989586621679616571"><span id="local-6989586621679616572"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679616501"><span class="annot"><a href="../../base/src/GHC.Base.html#Monad"><span class="hs-identifier hs-type">Monad</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Utils.Progress.html#Progress"><span class="hs-identifier hs-type">Progress</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679616572"><span class="hs-identifier hs-type">step</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679616571"><span class="hs-identifier hs-type">fail</span></a></span><span class="hs-special">)</span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-58"></span><span>  </span><span id="local-6989586621679616497"><span class="annot"><span class="annottext">return :: forall a. a -&gt; Progress step fail a
</span><a href="../../base/src/GHC.Base.html#return"><span class="hs-identifier hs-var hs-var hs-var hs-var">return</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Progress step fail a
forall (f :: * -&gt; *) a. Applicative f =&gt; a -&gt; f a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var">pure</span></a></span><span>
</span><span id="line-59"></span><span>  </span><span id="local-6989586621679616496"><span class="annot"><span class="annottext">Progress step fail a
</span><a href="#local-6989586621679616496"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679616495"><span class="annot"><span class="annottext">&gt;&gt;= :: forall a b.
Progress step fail a
-&gt; (a -&gt; Progress step fail b) -&gt; Progress step fail b
</span><a href="../../base/src/GHC.Base.html#%3E%3E%3D"><span class="hs-operator hs-var hs-var hs-var hs-var">&gt;&gt;=</span></a></span></span><span> </span><span id="local-6989586621679616494"><span class="annot"><span class="annottext">a -&gt; Progress step fail b
</span><a href="#local-6989586621679616494"><span class="hs-identifier hs-var">f</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(step -&gt; Progress step fail b -&gt; Progress step fail b)
-&gt; (fail -&gt; Progress step fail b)
-&gt; (a -&gt; Progress step fail b)
-&gt; Progress step fail a
-&gt; Progress step fail b
forall step a fail done.
(step -&gt; a -&gt; a)
-&gt; (fail -&gt; a) -&gt; (done -&gt; a) -&gt; Progress step fail done -&gt; a
</span><a href="Distribution.Utils.Progress.html#foldProgress"><span class="hs-identifier hs-var">foldProgress</span></a></span><span> </span><span class="annot"><span class="annottext">step -&gt; Progress step fail b -&gt; Progress step fail b
forall step fail done.
step -&gt; Progress step fail done -&gt; Progress step fail done
</span><a href="Distribution.Utils.Progress.html#Step"><span class="hs-identifier hs-var">Step</span></a></span><span> </span><span class="annot"><span class="annottext">fail -&gt; Progress step fail b
forall step fail done. fail -&gt; Progress step fail done
</span><a href="Distribution.Utils.Progress.html#Fail"><span class="hs-identifier hs-var">Fail</span></a></span><span> </span><span class="annot"><span class="annottext">a -&gt; Progress step fail b
</span><a href="#local-6989586621679616494"><span class="hs-identifier hs-var">f</span></a></span><span> </span><span class="annot"><span class="annottext">Progress step fail a
</span><a href="#local-6989586621679616496"><span class="hs-identifier hs-var">p</span></a></span></span></span><span>
</span><span id="line-60"></span><span>
</span><span id="line-61"></span><span id="local-6989586621679616492"><span id="local-6989586621679616493"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679616482"><span id="local-6989586621679616484"><span id="local-6989586621679616486"><span class="annot"><a href="../../base/src/GHC.Base.html#Applicative"><span class="hs-identifier hs-type">Applicative</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Utils.Progress.html#Progress"><span class="hs-identifier hs-type">Progress</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679616493"><span class="hs-identifier hs-type">step</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679616492"><span class="hs-identifier hs-type">fail</span></a></span><span class="hs-special">)</span></span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-62"></span><span>  </span><span id="local-6989586621679616480"><span class="annot"><span class="annottext">pure :: forall a. a -&gt; Progress step fail a
</span><a href="../../base/src/GHC.Base.html#pure"><span class="hs-identifier hs-var hs-var hs-var hs-var">pure</span></a></span></span><span> </span><span id="local-6989586621679616479"><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679616479"><span class="hs-identifier hs-var">a</span></a></span></span><span>  </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">a -&gt; Progress step fail a
forall step fail done. done -&gt; Progress step fail done
</span><a href="Distribution.Utils.Progress.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span> </span><span class="annot"><span class="annottext">a
</span><a href="#local-6989586621679616479"><span class="hs-identifier hs-var">a</span></a></span><span>
</span><span id="line-63"></span><span>  </span><span id="local-6989586621679616477"><span class="annot"><span class="annottext">Progress step fail (a -&gt; b)
</span><a href="#local-6989586621679616477"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679616476"><span class="annot"><span class="annottext">&lt;*&gt; :: forall a b.
Progress step fail (a -&gt; b)
-&gt; Progress step fail a -&gt; Progress step fail b
</span><a href="../../base/src/GHC.Base.html#%3C%2A%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;*&gt;</span></a></span></span><span> </span><span id="local-6989586621679616475"><span class="annot"><span class="annottext">Progress step fail a
</span><a href="#local-6989586621679616475"><span class="hs-identifier hs-var">x</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(step -&gt; Progress step fail b -&gt; Progress step fail b)
-&gt; (fail -&gt; Progress step fail b)
-&gt; ((a -&gt; b) -&gt; Progress step fail b)
-&gt; Progress step fail (a -&gt; b)
-&gt; Progress step fail b
forall step a fail done.
(step -&gt; a -&gt; a)
-&gt; (fail -&gt; a) -&gt; (done -&gt; a) -&gt; Progress step fail done -&gt; a
</span><a href="Distribution.Utils.Progress.html#foldProgress"><span class="hs-identifier hs-var">foldProgress</span></a></span><span> </span><span class="annot"><span class="annottext">step -&gt; Progress step fail b -&gt; Progress step fail b
forall step fail done.
step -&gt; Progress step fail done -&gt; Progress step fail done
</span><a href="Distribution.Utils.Progress.html#Step"><span class="hs-identifier hs-var">Step</span></a></span><span> </span><span class="annot"><span class="annottext">fail -&gt; Progress step fail b
forall step fail done. fail -&gt; Progress step fail done
</span><a href="Distribution.Utils.Progress.html#Fail"><span class="hs-identifier hs-var">Fail</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">((a -&gt; b) -&gt; Progress step fail a -&gt; Progress step fail b)
-&gt; Progress step fail a -&gt; (a -&gt; b) -&gt; Progress step fail b
forall a b c. (a -&gt; b -&gt; c) -&gt; b -&gt; a -&gt; c
</span><a href="../../base/src/GHC.Base.html#flip"><span class="hs-identifier hs-var">flip</span></a></span><span> </span><span class="annot"><span class="annottext">(a -&gt; b) -&gt; Progress step fail a -&gt; Progress step fail b
forall (f :: * -&gt; *) a b. Functor f =&gt; (a -&gt; b) -&gt; f a -&gt; f b
</span><a href="../../base/src/GHC.Base.html#fmap"><span class="hs-identifier hs-var">fmap</span></a></span><span> </span><span class="annot"><span class="annottext">Progress step fail a
</span><a href="#local-6989586621679616475"><span class="hs-identifier hs-var">x</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">Progress step fail (a -&gt; b)
</span><a href="#local-6989586621679616477"><span class="hs-identifier hs-var">p</span></a></span></span></span><span>
</span><span id="line-64"></span><span>
</span><span id="line-65"></span><span id="local-6989586621679616545"><span id="local-6989586621679616546"><span class="hs-keyword">instance</span><span> </span><span id="local-6989586621679616466"><span id="local-6989586621679616468"><span class="annot"><a href="../../base/src/GHC.Base.html#Monoid"><span class="hs-identifier hs-type">Monoid</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679616546"><span class="hs-identifier hs-type">fail</span></a></span><span> </span><span class="hs-glyph">=&gt;</span><span> </span><span class="annot"><a href="../../base/src/GHC.Base.html#Alternative"><span class="hs-identifier hs-type">Alternative</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><a href="Distribution.Utils.Progress.html#Progress"><span class="hs-identifier hs-type">Progress</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679616545"><span class="hs-identifier hs-type">step</span></a></span><span> </span><span class="annot"><a href="#local-6989586621679616546"><span class="hs-identifier hs-type">fail</span></a></span><span class="hs-special">)</span></span></span><span> </span><span class="hs-keyword">where</span><span>
</span><span id="line-66"></span><span>  </span><span id="local-6989586621679616463"><span class="annot"><span class="annottext">empty :: forall a. Progress step fail a
</span><a href="../../base/src/GHC.Base.html#empty"><span class="hs-identifier hs-var hs-var hs-var hs-var">empty</span></a></span></span><span>   </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">fail -&gt; Progress step fail a
forall step fail done. fail -&gt; Progress step fail done
</span><a href="Distribution.Utils.Progress.html#Fail"><span class="hs-identifier hs-var">Fail</span></a></span><span> </span><span class="annot"><span class="annottext">fail
forall a. Monoid a =&gt; a
</span><a href="../../base/src/GHC.Base.html#mempty"><span class="hs-identifier hs-var">Mon.mempty</span></a></span><span>
</span><span id="line-67"></span><span>  </span><span id="local-6989586621679616461"><span class="annot"><span class="annottext">Progress step fail a
</span><a href="#local-6989586621679616461"><span class="hs-identifier hs-var">p</span></a></span></span><span> </span><span id="local-6989586621679616460"><span class="annot"><span class="annottext">&lt;|&gt; :: forall a.
Progress step fail a
-&gt; Progress step fail a -&gt; Progress step fail a
</span><a href="../../base/src/GHC.Base.html#%3C%7C%3E"><span class="hs-operator hs-var hs-var hs-var hs-var">&lt;|&gt;</span></a></span></span><span> </span><span id="local-6989586621679616458"><span class="annot"><span class="annottext">Progress step fail a
</span><a href="#local-6989586621679616458"><span class="hs-identifier hs-var">q</span></a></span></span><span> </span><span class="hs-glyph">=</span><span> </span><span class="annot"><span class="annottext">(step -&gt; Progress step fail a -&gt; Progress step fail a)
-&gt; (fail -&gt; Progress step fail a)
-&gt; (a -&gt; Progress step fail a)
-&gt; Progress step fail a
-&gt; Progress step fail a
forall step a fail done.
(step -&gt; a -&gt; a)
-&gt; (fail -&gt; a) -&gt; (done -&gt; a) -&gt; Progress step fail done -&gt; a
</span><a href="Distribution.Utils.Progress.html#foldProgress"><span class="hs-identifier hs-var">foldProgress</span></a></span><span> </span><span class="annot"><span class="annottext">step -&gt; Progress step fail a -&gt; Progress step fail a
forall step fail done.
step -&gt; Progress step fail done -&gt; Progress step fail done
</span><a href="Distribution.Utils.Progress.html#Step"><span class="hs-identifier hs-var">Step</span></a></span><span> </span><span class="hs-special">(</span><span class="annot"><span class="annottext">Progress step fail a -&gt; fail -&gt; Progress step fail a
forall a b. a -&gt; b -&gt; a
</span><a href="../../base/src/GHC.Base.html#const"><span class="hs-identifier hs-var">const</span></a></span><span> </span><span class="annot"><span class="annottext">Progress step fail a
</span><a href="#local-6989586621679616458"><span class="hs-identifier hs-var">q</span></a></span><span class="hs-special">)</span><span> </span><span class="annot"><span class="annottext">a -&gt; Progress step fail a
forall step fail done. done -&gt; Progress step fail done
</span><a href="Distribution.Utils.Progress.html#Done"><span class="hs-identifier hs-var">Done</span></a></span><span> </span><span class="annot"><span class="annottext">Progress step fail a
</span><a href="#local-6989586621679616461"><span class="hs-identifier hs-var">p</span></a></span></span></span><span>
</span><span id="line-68"></span></pre></body></html>